<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<style type="text/css">
			body{
				margin: 0;
			}
			#ysOpenDevice {
				border-radius: 12px 12px 0 0;
			}
		</style>
	</head>
	<body>
		<iframe
		src="https://open.ys7.com/ezopen/h5/iframe_se?url=ezopen://ZQRWKA@open.ys7.com/E95470902/1.rec&autoplay=0&audio=1&accessToken=at.86uttxji4ot5fi5l4yni286w9d77wo20-3nq4ffz69d-0uxcmwc-jy8ccp50q&begin=20210201000000&end=20210201235959&templete=2"
		width="1401"
		height="581" 
		id="ysOpenDevice"
		allowfullscreen
		style="border:none"
		>
		</iframe>
		<!-- uni 的 SDK -->
		<script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script>
		<script type="text/javascript">
			var player = document.getElementById('ysOpenDevice').contentWindow; 
			/* iframe 支持方法 */
			player.postMessage("play", "https://open.ys7.com/ezopen/h5/iframe") /* 播放 */
			player.postMessage("stop", "https://open.ys7.com/ezopen/h5/iframe") /* 结束 */
			player.postMessage("capturePicture", "https://open.ys7.com/ezopen/h5/iframe") /* 截图 */
			player.postMessage("openSound", "https://open.ys7.com/ezopen/h5/iframe") /* 开启声音 */
			player.postMessage("closeSound", "https://open.ys7.com/ezopen/h5/iframe") /* 关闭声音 */
			player.postMessage("startSave", "https://open.ys7.com/ezopen/h5/iframe") /* 开始录制 */
			player.postMessage("stopSave", "https://open.ys7.com/ezopen/h5/iframe") /* 结束录制 */
			
			
			// var player = document.getElementById('ysOpenDevice').onclick(()=>{
			// 	var url = player.src
			// 	time = (new Date()).getTime()
			// 	if(url.indexOf('url') != -1){
			// 		player.src = url.replace(/url=\w+/,"url="+time);
			// 	}else {
		 //            iframe.src = url+"/#url="+time;
		 //        }
			// })
			
			
			
			// document.addEventListener('UniAppJSBridgeReady', function() {
			// 	var player = document.getElementById('ysOpenDevice').contentWindow;
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'play',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'stop',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'capturePicture',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'openSound',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'closeSound',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'startSave',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// 	uni.postMessage({
			// 		data: {
			// 			action: 'stopSave',
			// 			url: 'https://open.ys7.com/ezopen/h5/iframe'
			// 		},
			// 	});
			// })	
			
		</script>
	</body>
</html>